package com.gimi.cloud.jimi.manage.consumer.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.gimi.cloud.jimi.common.enums.ServiceNameConstants;
import com.gimi.cloud.jimi.common.mq.enume.QueueEnum;
import com.gimi.cloud.jimi.common.mq.service.MqCommonSenderService;
import com.gimi.cloud.jimi.common.utils.CommonUtil;
import com.gimi.cloud.jimi.common.utils.JsonUtil;
import com.gimi.cloud.jimi.dto.base.BaseDTO;
import com.gimi.cloud.jimi.dto.log.LogOperationDTO;
import com.gimi.cloud.jimi.manage.consumer.service.app.AdService;
import com.gimi.cloud.jimi.manage.consumer.service.app.ColumnService;
import com.gimi.cloud.jimi.manage.consumer.service.app.ColumnProdService;
import com.gimi.cloud.jimi.manage.consumer.service.app.MajorAdService;
import com.gimi.cloud.jimi.manage.consumer.service.order.OrderCostService;
import com.gimi.cloud.jimi.manage.consumer.service.order.OrderExpressService;
import com.gimi.cloud.jimi.manage.consumer.service.order.OrderGoodsService;
import com.gimi.cloud.jimi.manage.consumer.service.order.OrderInvoiceService;
import com.gimi.cloud.jimi.manage.consumer.service.order.OrderLogisticsService;
import com.gimi.cloud.jimi.manage.consumer.service.order.OrderService;
import com.gimi.cloud.jimi.manage.consumer.service.prod.*;
import com.gimi.cloud.jimi.manage.consumer.service.sys.AuthService;
import com.gimi.cloud.jimi.manage.consumer.service.sys.ConfigService;
import com.gimi.cloud.jimi.manage.consumer.service.sys.MasterService;
import com.gimi.cloud.jimi.manage.consumer.service.sys.MenuService;
import com.gimi.cloud.jimi.manage.consumer.service.sys.RoleService;
import com.gimi.cloud.jimi.manage.consumer.service.userInfo.MoreInfoService;
import com.gimi.cloud.jimi.manage.consumer.service.userInfo.UserInfoService;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import com.gimi.cloud.jimi.common.enums.ResponseCodeEnum;
import com.gimi.cloud.jimi.common.enums.ServiceNameEnum;
import com.gimi.cloud.jimi.manage.consumer.redis.IRedisService;
import com.gimi.cloud.jimi.common.utils.reqhead.Response;
import com.gimi.cloud.jimi.common.utils.reqhead.Util;
import org.springframework.web.multipart.MultipartFile;

import java.util.Arrays;
import java.util.Date;


@RestController
public class ManageMicroServiceConsumerController {

	private static Logger logger = LoggerFactory.getLogger(ManageMicroServiceConsumerController.class);
	private final IRedisService iRedisService;
	private final MasterService masterService;
	private final RoleService roleService;
	private final MenuService menuService;
	private final AuthService authService;
	private final CategoryService categoryService;
	private final BrandService brandService;
	private final ProdCatModelService prodCatModelService;
	private final ConfigService configService;
	private final AdService adService;
	private final ColumnService columnService;
	private final UserInfoService userInfoService;
	private final MajorAdService majorAdService;
	private final OrderService orderService;
	private final OrderGoodsService orderGoodsService;
	private final OrderExpressService orderExpressService;
	private final OrderInvoiceService orderInvoiceService;
	private final OrderCostService orderCostService;
	private final OrderLogisticsService orderLogisticsService;
	private final ColumnProdService columnProdService;
	private final LogisticsCompanyService logisticsCompanyService;
	private final SecurityInstructionsService securityInstructionsService;
	private final MoreInfoService moreInfoService;


	private final MqCommonSenderService mqCommonSenderService;


	@Autowired
	public ManageMicroServiceConsumerController(IRedisService iRedisService, MasterService masterService,ProdCatModelService prodCatModelService,
												RoleService roleService,MenuService menuService,
												AuthService authService, CategoryService categoryService,
												BrandService brandService,ConfigService configService,AdService adService,
												ColumnService columnService,UserInfoService userInfoService, MajorAdService majorAdService,
												OrderService orderService,OrderExpressService orderExpressService,OrderCostService orderCostService,
												OrderInvoiceService orderInvoiceService,OrderGoodsService orderGoodsService,OrderLogisticsService orderLogisticsService,
												ColumnProdService columnProdService,LogisticsCompanyService logisticsCompanyService,
												SecurityInstructionsService securityInstructionsService, MoreInfoService moreInfoService,
												MqCommonSenderService mqCommonSenderService) {

		this.iRedisService = iRedisService;
		this.masterService = masterService;
		this.roleService = roleService;
		this.menuService = menuService;
		this.categoryService = categoryService;
		this.authService = authService;
		this.prodCatModelService=prodCatModelService;
		this.brandService = brandService;
		this.configService=configService;
		this.adService=adService;
		this.columnService=columnService;
		this.userInfoService = userInfoService;
		this.majorAdService=majorAdService;
		this.orderService=orderService;
		this.orderExpressService=orderExpressService;
		this.orderGoodsService=orderGoodsService;
		this.orderInvoiceService=orderInvoiceService;
		this.orderCostService=orderCostService;
		this.orderLogisticsService=orderLogisticsService;
		this.columnProdService = columnProdService;
		this.logisticsCompanyService = logisticsCompanyService;
		this.securityInstructionsService = securityInstructionsService;
		this.moreInfoService = moreInfoService;
		this.mqCommonSenderService = mqCommonSenderService;
	}

	/**
	 * 作为后台服务的统一入口.
	 * @param requestData 请求参数
	 * @param request httpRequest
	 * @param response response
	 */
	@RequestMapping(value = "service")
	@ResponseBody
	public Response manageService(@RequestBody(required = false) String requestData, @RequestParam(value = "file",required = false) MultipartFile file
			, HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		logger.info("===>进入后台manage微服务主程序入口.");
		logger.info("token===>" + request.getHeader("authorization"));
		logger.info("serviceName===>" + request.getHeader("serviceName"));
        logger.info("入参requestData："+requestData);

		Response resp = new Response();

		/**
		 * 讲网关中的添加人更新人属性放入body
		 */
		String[] keys = new String[]{"serviceName","url","ip","authToken","uid","uname","addUid","addUname","addTime","updateUid","updateUname","updateTime"};
		requestData = CommonUtil.bodyHandle(requestData,request,keys);

		//记录日志
		LogOperationDTO logOperation = new LogOperationDTO();
		logOperation.setOpTime(new Date());
		String serviceName=request.getHeader("serviceName");
		ServiceNameEnum serviceNameEnum = ServiceNameEnum.getStatus(serviceName);
		switch (serviceNameEnum) {
			case MASTER_LIST://获取用户列表
				resp = masterService.getMasterList(requestData,request,response);
				break;
			case MASTER_SINGLE://获取单个用户
				resp = masterService.getMasterSingle(requestData,request,response);
				break;
			case MASTER_ADD://新增用户
				resp = masterService.addMaster(requestData,request,response);
				break;
			case MASTER_EDIT://编辑用户
				resp = masterService.editMaster(requestData,request,response);
				break;
			case MASTER_DELETE://删除用户
				resp = masterService.deleteMaster(requestData,request,response);
				break;
			case ROLE_LIST://获取角色列表
				resp = roleService.getRoleList(requestData,request,response);
				break;
			case ROLE_SINGLE://获取单个角色
                resp = roleService.getRoleSingle(requestData,request,response);
				break;
			case ROLE_PAGE_LIST://获取角色列表(分页)
				resp = roleService.getRolePageList(requestData,request,response);
				break;
			case ROLE_ADD://新增角色
				resp = roleService.addRole(requestData,request,response);
				break;
			case ROLE_EDIT://编辑角色
				resp = roleService.editRole(requestData,request,response);
				break;
			/*case ROLE_DELETE://删除角色
				roleService.deleteRole(requestData,request,response);
				break;*/
			case MASTER_LOGIN://用户登录
				resp = masterService.login(requestData,request,response);
				break;
			case MASTER_LOGIN_OUT://用户退出（注销）
				resp = masterService.loginOut(requestData,request,response);
				break;
			case MENU_LIST://获取菜单列表
                resp = menuService.getMenuList(requestData,request,response);
				break;
			case MENU_SINGLE://获取单个菜单
                resp = menuService.getMenuSingle(requestData,request,response);
				break;
			case MENU_ADD://新增菜单
                resp = menuService.addMenu(requestData,request,response);
				break;
			case MENU_UPDATE://修改菜单
                resp = menuService.updateMenu(requestData,request,response);
				break;
			case MENU_DELETE://删除菜单
                resp = menuService.deleteMenu(requestData,request,response);
				break;
			case AUTH_QUERY://权限查询
                resp = authService.authList(requestData,request,response);
				break;
			case AUTH_DOAUTH://权限
                resp = authService.doAuth(requestData,request,response);
				break;
			case CATEGORY_LIST_TREE://获得树形结构的商品品类列表
                resp = categoryService.getCategoryListTree(requestData,request,response);
				break;
			case CATEGORY_LIST://获取商品三级品类列表
                resp = categoryService.getCategoryList(requestData,request,response);
				break;
			case CATEGORY_LIST_BY_PARENT://根据父分类获取子分类列表，深度为1
                resp = categoryService.getCategoryListByParent(requestData,request,response);
				break;
			case SEARCH_CATEGORY_LIST_BY_GRADE://根据参数查询出所有的对应商品品类列表
                resp = categoryService.searchCategoryListByGrade(requestData,request,response);
				break;
			case CATEGORY_PAGE_LIST://获取商品品类列表(分页)
                resp = categoryService.getCategoryPageList(requestData,request,response);
				break;
			case CATEGORY_ADD://新增商品品类
                resp = categoryService.addCategory(requestData,request,response);
				break;
			case CATEGORY_UPDATE://修改商品品类
                resp = categoryService.updateCategory(requestData,request,response);
				break;
//			case GOTO_EDIT_PRODCATEGORY://转跳到编辑商品品类界面
//				categoryService.gotoEditProdCategory(requestData,request,response);
//				break;
			case LOAD_PORDCATEGORY_AND_INIT_MODELINFO://转跳到编辑商品品类界面（新）
                resp = categoryService.loadPordCategoryAndInitModelInfo(requestData,request,response);
				break;
			case GET_THREE_PRODCATMODEL://查询三级品类详情
                resp = categoryService.getThreeProdCatModel(requestData,request,response);
				break;
			case CATEGORY_DELETE://逻辑删除/启用商品品类
                resp = categoryService.deleteCategory(requestData,request,response);
				break;
			case CATEGORY_FILE_UPLOAD://商品品类logo图片上传
				resp = categoryService.fileUpload(response, request);
				break;
			case BRAND_FILE_UPLOAD://商品品牌文件上传
				resp = brandService.fileUpload(response,request);
				break;
			case BRAND_LIST://获取商品品牌列表
				resp = brandService.getBrandList(requestData,request,response);
				break;
			case BRAND_PAGE_LIST://获取商品品牌列表(分页)
				resp = brandService.getBrandPageList(requestData,request,response);
				break;
			case BRAND_ADD://新增商品品牌
				resp = brandService.addBrand(requestData,request,response);
				break;
			case BRAND_UPDATE://修改商品品牌
				resp = brandService.updateBrand(requestData,request,response);
				break;
			case GOTO_EDIT_PRODBRAND://转跳到编辑商品品类界面
				resp = brandService.gotoEditProdBrand(requestData,request,response);
				break;
			case BRAND_DELETE://删除商品品牌
				resp = brandService.deleteBrand(requestData,request,response);
				break;
			case GET_PRODCATMODEL_LIST:// 获取商品品类模板列表
				resp = prodCatModelService.getProdCatModelList(requestData,request,response);
				break;
			case ADD_PRODCATMODEL://添加商品品类模板
				resp = prodCatModelService.addProdCatModel(requestData,request,response);
				break;
			case EDIT_PRODCATMODEL://编辑商品品类模板
				resp = prodCatModelService.editProdCatModel(requestData,request,response);
				break;
			case GOTO_EDIT_PRODCATMODEL://转跳到编辑商品品类模板界面
				resp = prodCatModelService.gotoEditProdCatModel(requestData,request,response);
				break;
			case DELETE_PRODCATMODEL://删除商品品类模板，逻辑删除/启用，非真实删除
				resp = prodCatModelService.deleteProdCatModel(requestData,request,response);
				break;
			case REAL_DELETE_PRODCATMODEL://删除商品品类模板
				resp = prodCatModelService.realDeleteProdCatModel(requestData,request,response);
				break;

			case GET_PRODCATMODEL_VALUE_LIST://获得模板对应的所有属性值
				resp = prodCatModelService.getProdCatModelValueList(requestData,request,response);
				break;
			case ADD_PRODCATMODEL_VALUE://添加指定模板的属性值
				resp = prodCatModelService.addProdCatModelValue(requestData,request,response);
				break;
			case GOTO_EDIT_PRODCATMODEL_VALUE://跳转到指定模板的属性值修改界面
				resp = prodCatModelService.gotoEditProdCatModelValue(requestData,request,response);
				break;
			case EDIT_PRODCATMODEL_VALUE://修改指定模板的属性值
				resp = prodCatModelService.editProdCatModelValue(requestData,request,response);
				break;
			case REAL_DELETE_PRODCATMODEL_VALUE://删除指定模板的属性的其中一个值
				resp = prodCatModelService.realDeleteProdCatModelValue(requestData,request,response);
				break;

			case CONFIG_LIST://获取系统配置列表
				resp = configService.getConfigList(requestData, request, response);
				break;
			case CONFIG_PAGELIST://获取系统配置列表
				resp = configService.getConfigPageList(requestData, request, response);
				break;
			case CONFIG_ADD://添加系统配置
				resp = configService.addConfig(requestData, request, response);
				break;
			case CONFIG_UPDATE://添加系统配置
				resp = configService.updateConfig(requestData, request, response);
				break;
			case CONFIG_SINGLE://获得单一系统配置实体
				resp = configService.getConfigSingle(requestData, request, response);
				break;
			case CONFIG_DELETE://删除系统配置
				resp = configService.deleteConfig(requestData, request, response);
				break;

			case AD_RELY_COLUMNPROD://广告对应的商品
				resp = adService.adRelyColumnProd(requestData, request, response);
				break;
			case ADD_AD://添加广告
				resp = adService.addAd(requestData, request, response);
				break;
			case GET_ADLIST://获得广告列表展示（分页）
				resp = adService.getAdList(requestData, request, response);
				break;
			case DELETE_AD://删除广告
				resp = adService.deleteAd(requestData, request, response);
				break;
			case EDIT_AD://编辑广告
				resp = adService.editAd(requestData, request, response);
				break;
			case GOTO_EDIT_AD://转跳到编辑广告页面（查询指定广告）
				resp = adService.gotoEditAd(requestData, request, response);
				break;
			case GOTO_ADD_AD://转跳到编辑广告页面（查询出所有的栏目对象）
				resp = adService.gotoAddAd(requestData, request, response);
				break;
			case PUBLISH_AD://发布广告
				resp = adService.publishAd(requestData, request, response);
				break;
			case UNDER_AD://撤下广告
				resp = adService.underAd(requestData, request, response);
				break;
			case UPLOAD_AD_FILE://上传广告文件
				resp = adService.uploadAdFile(response,request);
				break;

			case MAJORAD_RELY_COLUMNPROD://选择商品时候，查看商品列表
				resp = majorAdService.majorAdRelyColumnProd(requestData, request, response);
				break;

			case MAJORAD_RELY_COLUMN://主页广告对应的栏目
				resp = majorAdService.majorAdRelyColumn(requestData, request, response);
				break;
			case ADD_MAJORAD://添加首页广告
				resp = majorAdService.AddMajorAd(requestData, request, response);
				break;
			case DELETE_MAJORAD://删除首页广告
				resp = majorAdService.deleteMajorAd(requestData, request, response);
				break;
			case EDIT_MAJORAD://编辑首页广告
				resp = majorAdService.editMajorAd(requestData, request, response);
				break;
			case GET_MAJORAD_LIST://获得首页广告列表展示（分页）
				resp = majorAdService.getMajorAdList(requestData, request, response);
				break;
			case GOTO_EDIT_MAJORAD://转跳到编辑首页广告页面（查询指定首页广告）
				resp = majorAdService.gotoEditMajorAd(requestData, request, response);
				break;
			case PUBLISH_MAJORAD://发布首页广告
				resp = majorAdService.publishMajorAd(requestData, request, response);
				break;
			case UNDER_MAJORAD://撤下首页广告
				resp = majorAdService.underMajorAd(requestData, request, response);
				break;
			case UPLOAD_MAJORAD_FILE://上传首页广告图片
				resp = majorAdService.uploadMajorAdFile(response,request);
				break;

			case ADD_COLUMN://添加栏目
				resp = columnService.addColumn(requestData, request, response);
				break;
			case GET_COLUMNLIST://获得栏目列表展示（分页）
				resp = columnService.getColumnList(requestData, request, response);
				break;
			case GET_PRE_COLUMNPROD_LIST://获得栏目及附属商品列表(预览)
				resp = columnService.getPreColumnProdList(requestData, request, response);
				break;
			case DELETE_COLUMN://启用/禁用栏目
				resp = columnService.deleteColumn(requestData, request, response);
				break;
			case EDIT_COLUMN://编辑栏目
				resp = columnService.editColumn(requestData, request, response);
				break;
			case GOTO_EDIT_COLUMN://转跳到编辑栏目页面（查询指定栏目）
				resp = columnService.gotoEditColumn(requestData, request, response);
				break;

			case GET_COLUMUPROD_LIST://栏目下的商品管列表(分页)
				resp = columnProdService.getColumnProdList(requestData, request, response);
				break;
			case ADD_COLUMUPROD://添加栏目下的商品
				resp = columnProdService.addColumnProd(requestData, request, response);
				break;
			case ADD_BATCH_COLUMNPROD://批量添加栏目下的商品
				resp = columnProdService.addBatchColumnProd(requestData, request, response);
				break;
			case GOTO_ADD_COLUMNPROD://转跳到添加栏目下的商品（查询不属于该栏目的商品）
				resp = columnProdService.goToaddColumnProd(requestData, request, response);
				break;
			case GOTO_EDIT_COLUMNPROD://转跳到编辑栏目下的商品
				resp = columnProdService.goToEditColumnProd(requestData, request, response);
				break;
			case EDIT_COLUMUPROD://编辑栏目下的商品
				resp = columnProdService.editColumnProd(requestData, request, response);
				break;
			case DEL_COLUMUPROD://删除栏目下的商品
				resp = columnProdService.delColumnProd(requestData, request, response);
				break;
			case UPLOAD_COLUMUPROD_FILE://上传栏目下商品的图片
				resp = columnProdService.upLoadColumnProdFile(response,request);
				break;

			case USERINFO_LIST://查询User详情列表
				resp = userInfoService.userInfoList(requestData, request, response);
				break;
			case USERINFO_PAGELIST://查询User详情列表(分页)
				resp = userInfoService.userInfoPageList(requestData, request, response);
				break;
			case USERINFO_SINGLE://查询单个use实体
				resp = userInfoService.getUserInfoSingle(requestData, request, response);
				break;
			case USERINFO_UPDATE://更新user信息
				resp = userInfoService.userInfoUpdate(requestData, request, response);
				break;
			case USER_ISCANBEUSED://用户连续几次输错密码后的启用，禁用，限制密码登录
				resp = userInfoService.userIsCanBeUsed(requestData, request, response);
				break;
			case USERINFO_DETAIL:
				resp = userInfoService.userDetail(requestData, request, response);
				break;
			case USER_APPINFO_LIST:
				resp = userInfoService.userAppInfoList(requestData, request, response);
				break;
			/*****订单管理******/
			case ORDER_PAGELIST://订单列表分页
				resp = orderService.OrderPageList(requestData, request, response);
				break;
			case ORDER_STATUS://更新订单状态信息
				resp = orderService.orderStatus(requestData, request, response);
				break;
			case ORDER_SINGLE_BASE://获得单个订单实体
				resp = orderService.getSingleOrderBase(requestData, request, response);
				break;
			case ORDER_UPDATE_BASE://更新订单基本信息
				resp = orderService.updateOrderBase(requestData, request, response);
				break;
			case ORDER_DELETE://删除单个订单信息
				resp = orderService.deleteOrder(requestData, request, response);
				break;
			case ORDER_DETAIL://订单详细信息
				resp = orderService.showOrderDetail(requestData, request, response);
				break;

			case ORDER_EXPRESS_DELETE://删除单个订单配送信息
				resp = orderExpressService.deleteOrderExpress(requestData, request, response);
				break;
			case ORDER_EXPRESS_SINGLE://获得单个订单配送信息
				resp = orderExpressService.getSingleOrderExpress(requestData, request, response);
				break;
			case ORDER_EXPRESS_UPDATE://修改单个订单配送信息
				resp = orderExpressService.updateOrderExpress(requestData, request, response);
				break;

			case ORDER_COST_DELETE://删除单个订单费用信息
				resp = orderCostService.deleteOrderCost(requestData, request, response);
				break;
			case ORDER_COST_SINGLE://获得单个订单费用信息
				resp = orderCostService.getSingleOrderCost(requestData, request, response);
				break;
			case ORDER_COST_UPDATE://修改单个订单费用信息
				resp = orderCostService.updateOrderCost(requestData, request, response);
				break;

			case ORDER_INVOICE_DELETE://删除单个订单发票信息
				resp = orderInvoiceService.deleteOrderInvoice(requestData, request, response);
				break;
			case ORDER_INVOICE_SINGLE://获得单个订单发票信息
				resp = orderInvoiceService.getSingleOrderInvoice(requestData, request, response);
				break;
			case ORDER_INVOICE_UPDATE://修改单个订单发票信息
				resp = orderInvoiceService.updateOrderInvoice(requestData, request, response);
				break;

			case ORDER_GOODS_DELETE://删除单个订单商品信息
				resp = orderGoodsService.deleteOrderGoods(requestData, request, response);
				break;
			case ORDER_GOODS_SINGLE://获得单个订单商品信息
				resp = orderGoodsService.getSingleOrderGoods(requestData, request, response);
				break;
			case ORDER_GOODS_UPDATE://修改单个订单商品信息
				resp = orderGoodsService.updateOrderGoods(requestData, request, response);
				break;

			case ORDER_LOGISTICS_DELETE://删除单个订单物流信息
				resp = orderLogisticsService.deleteOrderLogistics(requestData, request, response);
				break;
			case ORDER_LOGISTICS_SINGLE://获得单个订单物流信息
				resp = orderLogisticsService.getSingleOrderLogistics(requestData, request, response);
				break;
			case ORDER_LOGISTICS_UPDATE://修改单个订单物流信息
				resp = orderLogisticsService.updateOrderLogistics(requestData, request, response);
				break;

			/***物流公司管理***/
			case LOGISTICS_COMPANY_ADD://添加/修改物流公司信息
				resp = logisticsCompanyService.updateLogisticsCompany(requestData, request, response);
				break;
			case LOGISTICS_COMPANY_SINGLE://获得单个物流公司信息
				resp = logisticsCompanyService.getSingleLogisticsCompany(requestData, request, response);
				break;
			case LOGISTICS_COMPANY_DELETE://删除物流公司信息
				resp = logisticsCompanyService.deleteLogisticsCompany(requestData, request, response);
				break;
			case LOGISTICS_COMPANY_PAGELIST://分页列表
				resp = logisticsCompanyService.logisticsCompanyPageList(requestData, request, response);
				break;

            /***商品保障说明***/
            case GET_SECURITYINSTRUCTIONS_PAGELIST://获得保障说明列表（分页）
				resp = securityInstructionsService.getSecurityInstructionsPageList(requestData, request, response);
                break;
			case GET_SECURITYINSTRUCTIONS_SINGLE://获得单个保障说明
				resp = securityInstructionsService.getSecurityInstructionsSingle(requestData, request, response);
				break;
			case ADDOREDIT_SECURITYINSTRUCTIONS://添加或者修改保障说明
				resp = securityInstructionsService.addOrEditSecurityInstructions(requestData, request, response);
				break;
			case DEL_SECURITYINSTRUCTIONS://删除保障说明
				resp = securityInstructionsService.delSecurityInstructions(requestData, request, response);
				break;
			case FILEUPLOAD_SECURITYINSTRUCTIONS://上传商品保障说明图片
				resp = securityInstructionsService.fileUploadSecurityInstructions(response, request);
				break;
			case GET_USER_INFO_JXL :// "获取用户聚信力数据";
				resp = moreInfoService.jxlInfo(requestData, request, response);
				break;
			case GET_USER_INFO_TD :// "获取用户聚信力数据";
				resp = moreInfoService.tdInfo(requestData, request, response);
				break;
			case GET_USER_INFO_MIGUAN :// "获取用户聚信力数据";
				resp = moreInfoService.miguanInfo(requestData, request, response);
				break;
			case GET_USER_INFO_MORE :// "获取用户聚信力数据";
				resp = moreInfoService.moreinfo(requestData, request, response);
				break;

			default:
				resp.setResponseCode(ResponseCodeEnum.SERVICE_NAME_NOT_FOUND);
				Util.sendResponse(JsonUtil.toJson(resp), response);
				break;
		}

		//登录路径和Ueditor操作路径不能打日志，因为没有初始化BaseDTO
		String[] notCheck = {ServiceNameConstants.MASTER_LOGIN, ServiceNameConstants.UEDITOR_ACTION};
		Boolean flag= Arrays.asList(notCheck).contains(serviceName);

		if(serviceNameEnum.isLog() && !flag){
			BaseDTO baseDTO = JsonUtil.jsonToBean(requestData,BaseDTO.class);
			//请求服务名
			logOperation.setOpServiceName(serviceNameEnum.name() + "."+baseDTO.getServiceName());
			logOperation.setOpServiceDesc(serviceNameEnum.getDesc());
			logOperation.setMaId(baseDTO.getUid());
			logOperation.setMaName(baseDTO.getUname());
			logOperation.setOpModule("manage");
			logOperation.setOpUrl(request.getRequestURI());
			logOperation.setOpIp(baseDTO.getIp());
			logOperation.setOpResptime(new Date());
			if(serviceNameEnum.isLogParam()){
				logOperation.setOpParams(requestData);
			}
			logOperation.setOpResponseCode(resp.getRes_code());
			if(serviceNameEnum.isLogResult()){
				logOperation.setOpResponse(JsonUtil.toJson(resp));
			}
			//推送数据到消息队列
			try{
				mqCommonSenderService.sendMessage2Rabbitmq(QueueEnum.OPERATION_LOG,logOperation);
			}catch(Exception e){
				logger.info("推送日志到消息队列失败");
				e.printStackTrace();
			}
		}
		logger.info("===>执行完毕.\n");

		return resp;
	}

}